<template>
	<div class="home">
		<div class="homeBox">
		<router-link to="/center">
			<img class="home-img" :src="info.HeadImgUrl"/>
		</router-link>
		<router-link class="b1 icon-v" to="/news">
			<van-icon name="pending-orders" />
			<span>新闻</span>
		</router-link>
		<router-link class="b2 icon-v" to="/learn">
			<van-icon name="completed" />
			<span>学习</span>
		</router-link>
		<router-link class="b3 icon-v" to="/interactive">
			<van-icon name="pending-evaluate" />
			<span>互动</span>
		</router-link>
		<router-link class="b4 icon-v" to="/activity">
			<van-icon name="pending-deliver" />
			<span>活动</span>
		</router-link>
		</div>
	</div>
</template>

<script>
	import { Toast } from 'vant';
	export default {
		data() {
			return {
				gz:false,
				info:{}
			}
		},
		mounted: function() {
				this.setCookie('scrollTop',' ', -1)
				this.setCookie('tabActive',' ', -1)
				this.setCookie('tabActive1',' ', -1)
				this.setCookie('Category',' ', -1)	
				this.setCookie('WechatStatus',' ', -1)
				this.setCookie('SearchStatus',' ', -1)	
			this.onLoad();
		},
		methods: {
			onLoad() {
				this.$http.get(this.httpUrl + "/User/Center").then((response) => {
					if(response.data.status==undefined){
						Toast.clear();
						this.info = response.data;
					}
					else{ }
				}).catch(function(error) {
					console.log(error);
				})
			}
		}
	}
</script>

<style>
.home-img{ width: 80px; height: 80px; border-radius:40px; margin-left: -40px;left:50%; top:350px; position: absolute}
.home{ width:100%;height:100%;background:url(/static/images/home.jpg) no-repeat; background-size: 100%; position: absolute;}
.home .icon-v{ width: 4rem; height: 4rem; color: #fccc39; text-align: center; border-radius:3rem ;font-weight: bold}
.home .icon-v .van-icon{ font-size:2.5rem; margin-top:1rem;}
.home .icon-v span{ font-size:1.2rem; display: block;}
.home .b1{position: absolute; top:300px;left:70px}
.home .b2{position: absolute; top:300px;right:70px}
.home .b3{position: absolute; top:410px;left:70px}
.home .b4{position: absolute; top:410px;right:70px}
</style>